// TOWN DIALOGUE SCRIPT
//    Town 139: Porter's Retreat

begintalkscript;

variables;

short i,j,k,r1,choice;

// Elise

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 1;
	question = "Elise";
	text1 = "A tall, thin woman tends the bar. She looks you over nervously as you approach.";
	text2 = "_I'm Elise,_ she says. She's clearly on edge.";
	text5 = "Elise continues to tend the bar. She seems terribly nervous. You laugh in the face of death on a daily basis, yet her constant tension leaves even you on edge.";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 2;
	question = "_This is quite a large inn._";
	text1 = "_Thank you. This is the Porter's Retreat. That's where you are, you know. We have a round of beer for three coins, and a decent room for five._ She looks around nervously as she speaks. _Sorry. I've been a bit on edge._";

begintalknode;
	state = 2;
	nextstate = -1;
	question = "_Why is this place here?_";
	text1 = "_The only safe bed for many miles around. We get a lot of nervous people._";

begintalknode;
	state = 2;
	nextstate = 3;
	question = "_Why are you so nervous?_";
	text1 = "_There's a bunch of troglodytes living to the north. Yeah, troglodytes! There are still some around, and they're raiding us non-stop! The Porter's Retreat is the only place near here where merchants can be safe._ ";
	text3 = "_The troglodytes aren't attacking here as much these days, but just when we get complacent, a new bunch always comes down to attack. Still, it's not as bad as it was._";
	action = DEP_ON_SDF 307 8 0;

begintalknode;
	state = 3;
	nextstate = 4;
	question = "_How have you fared against the attacks?_";
	text1 = "She shakes her head. _We're well-armed, but we hope Sharimik or the Empire or someone does something soon. The things are really too tough for us to fight on our own._";
	text3 = "She sighs. _It's been worse. I guess I liked it better when they were extinct._";
	action = DEP_ON_SDF 307 8 0;

begintalknode;
	state = 4;
	nextstate = -1;
	question = "_Has the Empire helped at all?_";
	text1 = "She grimaces. _Fat lot of good they've been doing us. Our mighty leaders. Bah._ She'd better be careful. That's the sort of talk that's landed many people in Avernum.";

begintalknode;
	state = 1;
	nextstate = -1;
	condition = coins_amount() >= 3;
	question = "_A round of beer for me._";
	text1 = "As usual, the beer is pretty lousy, and again, as usual, it tastes great to you. You aren't looking forward to returning to the swill that's the order of the day in Avernum.";
	code =
		force_char_status(30000,1,20);
		change_coins(-3);
	break;

	
begintalknode;
	state = 1;
	nextstate = -1;
	condition = coins_amount() >= 5;
	question = "_I'll take a room._ Pay five coins.";
	text1 = "Elise shows you to your room. As she leave, she warns you, _Keep a sharp blade handy._";
	action = END_TALK;	
	code =
		revive_party();
		change_coins(-5);
		relocate_char(get_pc_id(0),34,40,FALSE);
		relocate_char(get_pc_id(1),35,40,FALSE);
		relocate_char(get_pc_id(2),35,41,FALSE);
		relocate_char(get_pc_id(3),34,41,FALSE);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = 1;
	question = "_I have to go._";
	text1 = "_All right. Watch out. Peril is everywhere._";
	action = END_TALK;

// Kendrick

begintalknode;
	tag = 60;
	state = -1;
	nextstate = 29;
	question = "Kendrick";
	text1 = "You meet a small man hunched over the table, making intricate notes on a map with a feather pen. He looks up. _I'm Kendrick. Greetings!_";
	text5 = "Kendrick remains hunched over the table, making intricate notes on a map with a feather pen.";
	action = INTRO;

begintalknode;
	state = 29;
	nextstate = 30;
	question = "_What are you doing?_";
	text1 = "_I'm a mapmaker, of course. A useful trade, in these parts._";
	
begintalknode;
	state = 30;
	nextstate = 33;
	question = "_What sorts of maps do you produce?_";
	text1 = "_All sorts, all scales, but especially maps of the countryside. And I take great pride in my trade!_";
	text2 = "_You can purchase a beautiful map of this area if you need it. Only thirty coins._";
	code =
		sf(139,11,1);
	break;
	
begintalknode;
	state = 30;
	nextstate = 31;
	question = "_Why is it so useful?_";
	text1 = "_This is one of the few known areas on the whole surface world which hasn't been totally explored. People need new, fresh maps._";

begintalknode;
	state = 31;
	nextstate = -1;
	question = "_So the rest of the Empire is well known?_";
	text1 = "_Everything the Empire owns is so settled and covered and recovered that Valorim is the only place a decent mapmaker can go to really do interesting work._";
	text2 = "_There're plenty of monsters here, of course, but I just avoid them._";


begintalknode;
	state = 32;
	nextstate = -1;
	question = "_How do you avoid the monsters?_";
	text1 = "_I run. All in a day's work!_";

begintalknode;
	state = 29;
	nextstate = 30;
	condition = gf(309,20) == 0 && gf(139,11) > 0 && coins_amount() >= 30;
	question = "_I'll buy one of your maps._ Pay 30 coins.";
	text1 = "Kendrick happily collects your coins and gives you a map of the desert regions of Valorim. Your world map has been expanded.";
	text2 = "(Press the World Map bottom to see the full world map.)";
	code =
		sf(309,20,1);
		change_coins(-30);
	break;

begintalknode;
	state = 29;
	nextstate = -1;
	condition = gf(309,20) > 0 && gf(139,11) > 0;
	question = "_Do you have any more maps for sale?_";
	text1 = "_I'm sorry. My stock is only for this region right now. I hope to survey the Isle of Bigail soon._";
	
// Jen

begintalknode;
	tag = 80;
	state = -1;
	nextstate = 57;
	question = "Jen";
	text1 = "This woman's skin is dark enough that she could pass for a surface dweller, but you immediately recognize her for what she is: an Avernite. She looks nervous. _I'm Jen. We shouldn't talk._";
	text5 = "Jen looks like she wants to stand up and walk away. _Really. We shouldn't talk._";
	action = INTRO;

begintalknode;
	state = 57;
	nextstate = 58;
	question = "_What are you doing up here?_";
	text1 = "_I'm Unspecified Services, formerly selling food in Formello. Look, we shouldn't talk._";

begintalknode;
	state = 58;
	nextstate = -1;
	question = "_Have you met any other Avernites up here?_";
	text1 = "_Even if I had, I wouldn't tell you. Secrecy. Orders._";

begintalknode;
	state = 58;
	nextstate = -1;
	question = "_Did you come up here before me?_";
	text1 = "_No. I volunteered after you left. My husband stayed home to fight our lizards and keep them under control._";

begintalknode;
	state = 58;
	nextstate = 57;
	question = "_Gee, you work for Unspecified Services? That's great! I do too! It's nice to meet you._";
	text1 = "She looks more nervous with every moment you spend talking to her. _Yes, Unspecified Services, like you. And again, we really, really shouldn't be seen talking._ She turns away.";
	action = END_TALK;

begintalknode;
	state = 57;
	nextstate = -1;
	question = "_Why shouldn't we talk?_";
	text1 = "_Right. Look. There's a woman on our side. She's collecting info in Sharimik and Lorelei. Goes by the name 'Sandra.' You'll recognize her as an Avernite. Look for her. She can help. Now go away._";
	text2 = "She stares down into her beer and starts to ignore you.";
	action = END_TALK;

